
function locationInit(){
	if(geo_position_js.init()){
		geo_position_js.getCurrentPosition(getAndFillLocations,errorInLocation,{enableHighAccuracy:true});
	}else{
		alert("Functionality not available");
	}
}

function getAndFillLocations(p){
  document.getElementById("latitude").value = p.coords.latitude;
  document.getElementById("longitude").value = p.coords.longitude;
  document.getElementById("accuracy").value = p.coords.accuracy;
}

function errorInLocation(p){
    alert("Sorry, Location not obtainable (" + p.code + "). Please enter manually");
}
